import request from '@/utils/request'

export function login(data) {
  return request.post('/admin/login', data)
}

export function updateMyInfo(data) {
  return request.put('/admin/my', data)
}

export function getInfo() {
  return request({
    url: '/admin/info',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/admin/adminLogout',
    method: 'post'
  })
}

export function refreshToken() {
  return request.get('/refreshToken')
}
